package cn.jinhe.doc.domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

public class Topic extends Article {

	/** 普通文章 */
	public static final int TYPE_NORMAL = 0;

	/** 精华文章 */
	public static final int TYPE_BEST = 1;

	/** 置顶文章 */
	public static final int TYPE_TOP = 2;


	private Repository repository;// 所属版块
	private Set<Reply> replies = new HashSet<Reply>();

	private int type;// 类型
	private int replyCount;// 回复数量
	private Reply lastReply;// 最后回复
	private Date lastUpdateTime;// 最后更新时间（主题发表时间或最后回复的时间）

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Repository getRepository() {
		return repository;
	}

	public void setRepository(Repository repository) {
		this.repository = repository;
	}

	public Set<Reply> getReplies() {
		return replies;
	}

	public void setReplies(Set<Reply> replies) {
		this.replies = replies;
	}

	public int getReplyCount() {
		return replyCount;
	}

	public void setReplyCount(int replyCount) {
		this.replyCount = replyCount;
	}

	public Reply getLastReply() {
		return lastReply;
	}

	public void setLastReply(Reply lastReply) {
		this.lastReply = lastReply;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

}
